//
//  MoreShowController.m
//  LiveDailyNews
//
//  Created by smu on 11-7-25.
//  Copyright 2011年 duk. All rights reserved.
//

#import "MoreShowController.h"


@implementation MoreShowController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)dealloc
{
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    UIView *contentView = [[[UIView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame] autorelease];
    contentView.autoresizesSubviews = YES;
    self.view = contentView;
    [self.view setBackgroundColor:[UIColor cyanColor]];
    NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
    webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 
                                                          contentView.bounds.size.width, contentView.bounds.size.height - 44)];
    [webView setUserInteractionEnabled:YES];
    [webView setDelegate:self];
    [webView setOpaque:NO];
    [self.view addSubview:webView];
    
    //自动加载URL
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[userDefault objectForKey:@"moreLink"] ]]];
    
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
